<template>
  <div>
    <el-form ref="form" :model="form"   :inline="false" label-width="140px">
      <el-form-item label="申请人" prop="applyUserName">
        <el-input v-model="form.applyUserName" :disabled="true" style="width: 200px"/>
      </el-form-item>

      <el-form-item label="公司" prop="company">
                  <el-input v-model="form.company" style="width: 200px" :disabled="true" />
      </el-form-item>
      <el-form-item label="岗位" prop="post">
                  <el-input v-model="form.post" style="width: 200px" :disabled="true" />
      </el-form-item>
      <el-form-item label="类型" prop="type">
        <el-input v-model="form.type" style="width: 200px" :disabled="true" />
      </el-form-item>
      <el-form-item label="入职日期" prop="entryDate" >
        <el-input v-model="form.entryDate" style="width: 200px" :disabled="true" />
      </el-form-item>
      <el-form-item label="离职申请时间" prop="applyDimissionDate">
        <el-input v-model="form.applyDimissionDate" style="width: 200px" :disabled="true" />
      </el-form-item>
      <el-form-item label="拟离职日期" prop="dimissionDate">
        <el-input v-model="form.dimissionDate" style="width: 200px" :disabled="true" />
      </el-form-item>
      <el-form-item label="离职原因" prop="dimissionReason">
        <el-input v-model="form.dimissionReason" style="width: 200px" :disabled="true" />
      </el-form-item>

      <el-form-item label="备注" prop="remark">
        <el-input  v-model="form.remark" type="textarea" style="width: 200px" :disabled="true" />
      </el-form-item>
      <el-form-item label="是否使用流程模板" prop="typeStatus">
        <el-input  v-model="form.typeStatus" style="width: 200px" :disabled="true" />
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import {getDicts} from "@/api/system/dict/data";

export default {
  name: "oaDimission.vue",
  props:{form:Object},
  data(){
    typeoptions:[]
    return{

    }
  },
  created() {
    this.gettypeoptions();
  },
  methods:{
    //回显处理
    getValue(arr, item) {
      for (let i = 0; i < arr.length; i++) {
        if (item === arr[i].dictValue) {
          return arr[i].dictLabel
        }
      }
    },
    //离职类型
    gettypeoptions(){
      getDicts('dimisson').then(res=>{
        this.typeoptions=res.data
        this.form.type=this.getValue(this.typeoptions,this.form.type)
      })
    },
  }
}
</script>

<style scoped>

</style>
